package Interfaz;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class Menu extends JFrame implements ActionListener{

    private JButton BTcambiarcoreo;
    private JButton BTvercoreo;
    private JLabel JLnur;
    private JButton jButton2;

    public Menu() {
        initComponents();
        this.setTitle("CORREO NUR");
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setSize(400,400);
        this.setLayout(null);
        this.setVisible(true);
    }

    private void initComponents() {
        JLnur = new JLabel();
        BTvercoreo = new JButton();
        jButton2 = new JButton();
        BTcambiarcoreo = new JButton();

        JLnur.setFont(new Font("Showcard Gothic", 1, 24)); // NOI18N
        JLnur.setForeground(new Color(0, 0, 255));
        JLnur.setText("NUR");
        BTvercoreo.setText("VER CORREO");
        jButton2.setText("ENVIAR CORREO");
        BTcambiarcoreo.setText("CAMBIAR CORREO");
        BTcambiarcoreo.addActionListener(this);
        BTvercoreo.addActionListener(this);
        jButton2.addActionListener(this);
        
        
        add(JLnur);
        JLnur.setBounds(170, 50, 80, 35);
        
        add(BTvercoreo);
        BTvercoreo.setBounds(110, 120, 180, 35);
        
        add(jButton2);
        jButton2.setBounds(110, 180, 180, 35);
        
        add(BTcambiarcoreo);
        BTcambiarcoreo.setBounds(110, 240, 180, 35);
        
    }
    
    public static void main(String args[]) {
        new Menu();

    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if(e.getSource() == BTcambiarcoreo){
            Principal pl = new Principal();
            pl.setVisible(true);
            dispose();
        }
        
        if(e.getSource() == BTvercoreo){
        	VerMensajes ver = new VerMensajes();
        	ver.setVisible(true);
        	dispose();
        }
    }
}
